<!DOCTYPE html>
<html class="ui-mobile">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href=".">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <title>填写简历</title>
    <link rel="stylesheet" href="../tool/jquery-mobile/jquery.mobile-1.4.2.min.css">
    <link rel="stylesheet" href="../css/resume.css">
    <script src="../tool/jquery/jquery-1.11.2.min.js"></script>
    <script src="../tool/jquery-mobile/jquery.mobile-1.4.2.min.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/http.js"></script>

</head>
<body class="ui-mobile-viewport ui-overlay-a">
<div data-role="page" id="resumestart" data-url="resumestart" tabindex="0"
     class="ui-page ui-page-theme-a ui-page-active div_page">

    <div style="position:fixed;left:0;top:0;width:100%;z-index:200;">
        <div class="div_header">
            <p class="p_title" style="">填写简历</p>
            <button id="titleButton" style="padding: 5px 0 5px 0;text-shadow: none;"
                    class=" ui-btn ui-shadow ui-corner-all">返回
            </button>
        </div>
    </div>
    <div class="div_header">
    </div>

    <div class="message">
        <p><span class="span_realName"></span></p>
        <p id="phone">139********</p>
    </div>
    <div style="background:#ffffff;width:100%">
        <div class="resume_t">
            <span style="position:absolute;padding:15px;margin-left:0px;">我的简历</span>
            <span class="right">
				完整度 <span id="per"></span>
			</span>
        </div>
        <div class="resume" id="re1"><img src="../image/signIn_02_03.png" alt=""><span class="left">个人资料</span><span
                class="right" id="per1"><span class="span_per">请完善</span></span></div>
        <div class="resume" id="re2"><img src="../image/signIn_02_06.png" alt=""><span class="left">求职意向</span><span
                class="right" id="per2"><span class="span_per">请完善</span></span></div>
        <div class="resume" id="re3"><img src="../image/signIn_02_08.png" alt=""><span class="left">工作经历</span><span
                class="right" id="per3"><span class="span_per">请完善</span></span></div>
        <div class="resume" id="re4"><img src="../image/signIn_02_10.png" alt="" style="margin-left:3px"><span
                class="left">教育经历</span><span class="right" id="per4"><span class="span_per">请完善</span></span></div>
    </div>
    <button id="logout">退出</button>
    <input type="hidden" id="userId">

    <table class="fix_table">
        <tbody>
        <tr style="border-top:1px solid #dddddd">
            <td class="fix_book_td" id="fairs">
                <div>岗位列表</div>
            </td>
            <td class="fix_book_td" id="apped">
                <div>我的反馈</div>
            </td>
            <td class="fix_book_td_active" id="resume">
                <div>我的简历</div>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="delay"><p>保存中,请稍等...</p></div>
    <div id="overlay"></div>
    <div class="left-button">
        <span>签到&志愿</span>
    </div>
</div>

<script type="text/javascript">

    $(document).ready(function () {
        function loadResume() {
            http.get({
                url: common.sctx + '/personal/resume/info.do',
                success: function (info) {
                    $("#per").html(info.integrity + "%");

                    if(info.integrity >= 70) {
                        $(".left-button").show();
                    }

                    if (info.basicFull) {
                        $("#per1").html("完成");
                    } else {
                        $("#per1").html("请完善").addClass("span_per");
                    }
                    if (info.jobTargetFull) {
                        $("#per2").html("完成");
                    } else {
                        $("#per2").html("请完善").addClass("span_per");
                    }
                    if (info.experienceFull) {
                        $("#per3").html("完成");
                    } else {
                        $("#per3").html("请完善").addClass("span_per");
                    }
                    if (info.educationFull) {
                        $("#per4").html("完成");
                    } else {
                        $("#per4").html("请完善").addClass("span_per");
                    }
                }
            });
        };

        common.userSession(function (user) {
            $("#userId").val(user.id);
            $(".span_realName").text(user.userName || '');
            $("#phone").text(user.mobile);
            loadResume();
        });

        $("#logout").click(function () {
            window.location.href = common.sctx + "/j_spring_security_logout";
        });


        $("#re1").click(function () {
            window.location.href = common.ctx + "/html/resume-basic.html";
        });

        $("#re2").click(function () {
            window.location.href = common.ctx + "/html/resume-jobTarget.html";
        });

        $("#re3").click(function () {
            window.location.href = common.ctx + "/html/resume-experience.html";
        });

        $("#re4").click(function () {
            window.location.href = common.ctx + "/html/resume-education.html";
        });

        $("#titleButton").click(function () {
            history.back(-1);
        });

        $("#fairs").click(function () {
            window.location.href = common.ctx + "/html/fairList.html";
        });

        $("#apped").click(function () {
            window.location.href = common.ctx + "/html/appoiList.html";
        });
        $("#resume").click(function () {
            return false;
        });
        $("#result").click(function () {
            window.location.href = common.ctx + "/html/result.html";
        });
        $(".left-button").click(function () {
            window.location.href = common.ctx + "/html/sign.html";
        });

    });

</script>
<div class="ui-loader ui-corner-all ui-body-a ui-loader-default"><span class="ui-icon-loading"></span>
    <h1>loading</h1></div>
</body>
</html>